<?php 
	//获取数据
   	$db = include "./db.php";
   	$color = ['alert-success','alert-info','alert-warning','alert-danger'];
   	
   	$count = count($db);
   	$num = 3;
   	//获取总页数
   	$pages = ceil($count/$num);
   $page = isset($_GET['p']) ? $_GET['p'] : $pages;//当前页数

   //获取偏移量
   	$offet = ($page-1)*$num;

   	$db = array_slice($db, $offet,$num,true);
   	include "./Tpl/index.html";









 ?>